<#setting number_format="#">
<#assign randomId=util.randomId()>
<div class="rx-table-body active" ctltype="rx-table" tableid="${ent.id}" type="onetomany"
     id="${randomId}" tablename="${ent.alias}">
    <div class="table-header-tool">
        <div class="title">
            <div>
                ${ent.name}
            </div>
        </div>
        <a-button-group v-if="!getReadonly()">
            <a-button v-if="getSubTablePermission('${ent.alias}','add')" v-on:click="add('${ent.alias}','inner','','','${randomId}','first')">
                添加
            </a-button>
            <a-button v-if="getSubTablePermission('${ent.alias}','remove')" v-on:click="remove('${ent.alias}','inner','','','${randomId}','first')">
                删除
            </a-button>
            <a-button v-if="getSubTablePermission('${ent.alias}','up')" v-on:click="up('${ent.alias}','inner','','','${randomId}','first')">
                上移
            </a-button>
            <a-button v-if="getSubTablePermission('${ent.alias}','down')" v-on:click="down('${ent.alias}','inner','','','${randomId}','first')">
                下移
            </a-button>
        </a-button-group>
    </div>
    <div class="rx-table-box">
        <table class="rx-table">
            <col style="width: 60px;"/>
            <col style="width: 60px;"/>
            <#list ent.boAttrList as field>
                <#if (field.control!='rx-ref')>
                    <col style="width: 160px;"/>
                </#if>
            </#list>
            <thead>
            <tr class="firstRow">
                <th>#</th>
                <th>序号</th>
                <#list ent.boAttrList as field>
                    <#if (field.control!='rx-ref')>
                        <th <@fieldReqiredOneToMany field=field tableName="${ent.alias}"/>>
                            ${field.comment}
                        </th>
                    </#if>
                </#list>
            </tr>
            </thead>
            <tbody>
            <tr v-for="(item,index) in data.sub__${ent.alias}" :key="item.index_" v-tableselect="{item:item,selmode:&#39;multi&#39;,data:data.sub__${ent.alias}}"
                :class="{active:item.selected}">
                <td><a-checkbox :checked="item.selected"></a-checkbox></td>
                <td><rx-serial :serial="index+1"></rx-serial></td>
                <#list ent.boAttrList as field>
                    <#if (field.control!='rx-ref')>
                        <td>
                            <@fieldCtrl field=field type='onetomany' entName=ent.alias readonly="getRead(false)"/>
                        </td>
                    </#if>
                </#list>
            </tr>
            </tbody>
        </table>
        <div class="tableEmpty" v-if="data.sub__${ent.alias}&amp;&amp;data.sub__${ent.alias}.length &lt;= 0">
            <a-empty></a-empty>
        </div>
    </div>
</div>
